Anti-aliasing techniques are well-known in the art of computer-generated graphics. Aliasing refers to image artifacts caused by a limited sampling resolution of edges. One common artifact produced as a result of aliasing is a Moire pattern, which is a type of spatial aliasing that causes alternating bands of light and dark colors to appear when, e.g., two grids are overlaid at an angle.
There are many common techniques to reduce the artifacts caused by aliasing. For example, supersample anti-aliasing (SSAA) is a technique that selects multiple points within each pixel (not just the pixel center), shades each of the multiple points to generate multiple color values for the pixel, and then blends the multiple color values to generate a filtered color value for the pixel. It will be appreciated that SSAA increases the resolution of the generated digital image and then down-samples the digital image (i.e., filters) to get a digital image at the desired resolution. The artifacts due to aliasing in the down-sampled digital image are reduced when compared to an image generated at the final resolution. However, SSAA has drawbacks in that each point sampled within a pixel increases the computation required to generate the digital image (e.g., 4×SSAA requires approximately 4 times the number of texture operations compared to techniques which compute a single color for the pixel).
Another anti-aliasing technique is multi-sample anti-aliasing (MSAA), which is a special case of SSAA. In MSAA, the graphics processing pipeline implements certain operations using multiple sample points within each pixel; however, the fragment shading program is only computed once per pixel and is typically evaluated based on a sample location at the center of the pixel. MSAA typically involves a smaller number of computations when compared to SSAA because, e.g., texture reads are only performed for a single point for each pixel.
Modern graphics processors typically implement at least one technique to reduce aliasing artifacts. However, implementation of anti-aliasing techniques may reduce the processing efficiency of the graphics processing pipeline. Furthermore, many implementations of SSAA or MSAA in graphics processors utilize a fixed set of sample locations stored in static random access memory (SRAM), which limits the different anti-aliasing algorithms that can be implemented by software. Some algorithms for implementing anti-aliasing may benefit from varying sample patterns across the pixels of a digital image, which is not possible with fixed sample locations specified by the hardware architecture.
However, when sample patterns can be changed, data that is stored in a compressed format may not be correctly reconstructed. For example, when a first sample pattern is used to compress data, the data cannot necessarily be correctly reconstructed using a second sample pattern. Thus, there is a need for addressing this issue and/or other issues associated with the prior art.